package grupb.upf.imageProcessing;

import java.awt.Color;
import java.awt.Graphics2D;

public final class TagAnnotation extends DrawableAnnotation {

    private int x;
    private int y;
    private int width;
    private int height;

    public TagAnnotation(final int[] points) {
        final int a = points[0];
        final int b = points[1];
        final int c = points[2];
        final int d = points[3];
        x = a;
        width = c - a;
        y = b;
        height = d - b;
    }

    // Concrete implementation of the paint method
    @Override
    public void paint(final Graphics2D g2d) {
        g2d.setColor(Color.RED);
        g2d.draw3DRect(x, y, width, height, true);
    }
}
